<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>dark主题</title>
    <script src="../echarts.min.js"></script>
    <script src="../dark.js"></script>
</head>
<body>
    <div id="main" style="height: 400px;width: 600px;"></div>
</body>
<script>
    let mychart = echarts.init(document.getElementById("main"),'dark')
    let option = {
        title:{
            text:"我是dark主题"
        },
        legend:{
            data:["A产品","B产品"]
        },
        xAxis:{type:"value"},
        yAxis:{
            type:"category",
            data:["商场A","商场B","商场C","商场D","商场E"]
        },
        series:[
            {
                name:"A产品",
                type:"bar",
                data:[250,320,120,540,121],
                label:{
                    show:true,
                    position:"inside"
                }
            },
            {
                name:"B产品",
                type:"bar",
                data:[456,320,47,45,652],
                label:{
                    show:true,
                    position:"inside"
                }
            }
        ]
    }
    mychart.setOption(option)
</script>
</html>